#!/bin/bash

# 推送现有的 Git 仓库
git clone -b img git@gitcode.net:linux/ubuntu.git




git@gitcode.net:hq_java/video.git
distributionUrl=file:///mnt/nas/smb/gradle/gradle-7.5-bin.zip









apt-get install git
apt-get install ssh
service ssh start



ssh-keygen -t rsa


cat id_rsa.pub > .ssh/authorized_keys

 mkdir gitrepo
 chown git:git gitrepo

cd /home/git/gitrepo
git init --bare test.git
chown -R git:git test.git

root@192.168.2.240:/mnt/nas/work/git/myqq/so.git


git config --global user.name "root"
git remote add origin root@192.168.2.240:/mnt/nas/work/git/myqq/so.git


推送现有的 Git 仓库
cd existing_repo
git remote rename origin old-origin
git remote add qq root@192.168.2.240:/mnt/nas/work/git/myqq/so.git
git push -u qq --all
git push -u origin --tags

查看当前配置的远程仓库
git remote -v
删除旧的远程仓库配置：
git remote remove qq

git remote remove old-origin
ssh git@192.168.2.240

git clone  git@192.168.2.240:/home/git/gitrepo/test.git/



Git 全局设置
git config --global user.name "qq_29578241"
git config --global user.email "qq_29578241@gitcode.net"

创建一个新仓库
git clone https://gitcode.net/qq_29578241/qqtv.git
cd qqtv
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

推送现有文件夹
cd existing_folder
git init
git remote add origin https://gitcode.net/qq_29578241/qqtv.git
git add .
git commit -m "Initial commit"
git push -u origin master

推送现有的 Git 仓库
cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitcode.net/qq_29578241/qqtv.git
git push -u origin --all
git push -u origin --tags














GIT_HOME

Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
#
#
#
# Windows系统下 cmd ssh目录下生成的公钥证书文件
ssh-keygen -t rsa "win11"



# 复制Windows系统下.ssh目录下生成的公钥证书文件id_rsa.pub重命名为 authorized_keys
authorized_keys
"/root/.ssh/authorized_keys"
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCo2iYI+Kv4exmoH/srwPPszXgkRxRjeqfd+J/cpYofAYSREsUESOvRvKpVRtFx94jzqg1FThgysXRkgpIc04qsKoaoC/QKj47+fQuOIA4JNcUq9PlU4Wh1GcdlBljECyVGNf3vbtiL4XOcl7o0xKyBsVMdqNi4AJfgtraqTb50X7xiUPIvPySI1u8XsCeezgY/7YbF2fXQ31yB1kcnbP8VqY3m6dp+I9tBp3K6KH28IhOXNxqyC+riKNIIhFPfBRvZoGZVM4rIDDtqaw5lDY8SlE2+m7dJbZUrwgRN5Vb+wiO/DOzd7rld765Ox4kPk2fg5klk4uIbR+FbaCp2CuTbB74aW+jLQW8HneLQUXGUNMBm+ejmliiY0LVYmKXLXTpO/tR9NxyowYueJm2Xl3uHnOMYmtqjAcQMr3IKT3PBfZoj+WYStdGytiGBtwcx0iOC/QkSJzM+Nag3mKdUKLMTsPcYHYXwjomWlP97biprKg7MWJrmQWVqWIb/Had8MrU= administrator@DESKTOP-4A9B55L" >> /root/.ssh/authorized_keys


ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 https://svipsvip.ffzy-online5.com/20240810/31244_eba9940b/index.m3u8


http://192.168.2.240/








阿里-Maven仓库代理源:
https://maven.aliyun.com/repository/public
腾讯云-Maven仓库代理源:
http://mirrors.cloud.tencent.com/nexus/repository/maven-public
华为云-Maven仓库代理源:
https://repo.huaweicloud.com/repository/maven/


cat > /etc/profile.d/sdk.sh << EOF
#!/bin/bash
# java 环境变量
export JAVA_HOME=/mnt/jdk1.8.0_121
export JAVA_BIN=\$JAVA_HOME/bin

# 执行文件路径
export PATH=\$JAVA_BIN:\$PATH
EOF

source /etc/profile
ldconfig


















SRC_DIR="/mnt/nas/work/sdk/ffmpeg-4-4-4"
DST_DIR="/usr"
echo
# 确保目标目录存在
mkdir -p "$DST_DIR"

# 递归创建软连接
find "$SRC_DIR" -type df -exec ln -sv --target-directory="$DST_DIR" {} +
find "$SRC_DIR" -type d -exec ln -sv --target-directory="$DST_DIR" {} +


find "$SRC_DIR" -type f -exec rm -rvf --target-directory="$DST_DIR" {} +


rm -rf


nohup java -jar myapp.jar > myapp.txt




# 查找硬盘
find / -name vm-102-disk*
#
#
#
#
#

sudo fdisk -l                 # 查找你的Ubuntu分区，通常是/dev/sdaX
sudo mount /dev/sdaX /mnt     # 将Ubuntu分区挂载到/mnt

sudo grub-install --boot-directory=./ /dev/sdd

重建GRUB配置文件：
sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg

sudo chroot /mnt
grub-mkconfig
grub-install /dev/sda
grub-install --recheck /dev/sdd
update-grub






# 输出可能会显示类似于 /dev/loop0，记住这个设备路径

# 挂载loop设备，选择你想要的文件系统类型，例如ext4
mount /dev/loop0 /mnt/date -o loop

# 现在你的映射文件就被挂载到/mnt/my_mount_point了













ubuntu挂载 iscsi
iscsi教程
#发起程序 id iqn.1991-05.controller.microsoft:desktop-linux
# 配置文件 /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1991-05.com.microsoft:desktop-linux

# 配置iSCSI CHAP认证信息。
# 编辑 /etc/iscsi/iscsid.conf文件
node.session.auth.authmethod = CHAP
node.session.auth.username = qq
node.session.auth.password = hqq1813033378
# 服务重启
systemctl restart iscsid

# 发现 iSCSI目标
iscsiadm -m discovery -t st -p 192.168.2.252
# 发现 iSCSI目标
iscsiadm -m discovery -t sendtargets -p 192.168.2.252
# 登录服务
iscsiadm -m node -T iqn.2007-07.com.u-nas:istgt.linux -p 192.168.2.252 --login





系统启动时自动登入
iscsiadm -m node -T iqn.2007-07.com.u-nas:istgt.linux -p 192.168.2.252 -l –o update -n node.startup -v automatic
登入需验证的节点：
开启认证
iscsiadm -m node -T iqn.1997-05.com.test:raid -o update --name node.session.auth.authmethod --value=CHAP
添加用户
iscsiadm -m node -T iqn.1997-05.com.test:raid --op update --name node.session.auth.username --value=test_user

添加密码
iscsiadm –m node –T iqn.1997-05.com.test:raid –op update –name node.session.auth.password –value=test_password


注销单个节点
首先解除挂载，然后注销

iscsiadm -m node –T iqn.1997-05.com.test:raid -p 192.168.1.1:3260 –u
注销所有连接
iscsiadm -m node --logoutall=all
查看target记录
iscsiadm -m node
查看所有iscsi连接
iscsiadm -m session
删除target
iscsiadm -m node -o delete -T iqn.1997-05.com.test:raid -p 192.168.1.1:3260













wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo



2.下载阿里yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo



3.清理yum缓存，重建缓存
yum clean all
yum makecache
4.安装epel-re



cd /etc/yum.repos.d/

# 下载阿里yum源
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all
yum makecache









mkfs.vfat -n "sd"  /dev/mmcblk1
mkdir -p sd

mkdir -p sdk

mount  /dev/mmcblk1 /mnt/sd
UUID=74CD-8585 /mnt/sd vfat defaults 0 2

sync
echo "Done"

echo "Start copy system for eMMC."

# java环境搭建
# 1 解压

JAVA_HOME



export JAVA_HOME=/opt/java/jdk-18.0.2.1
export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile

java -version
export CATALINA_HOME=/usr/local/java/apache-tomcat-7.0.100

tar czvf /mnt/java-1-8-0-342.tar.gz ./*

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


docker run -d --name aria2 --restart unless-stopped \
--log-opt max-size=1m -e PUID=$UID -e PGID=$GID \
-e UMASK_SET=022 -e RPC_SECRET=1813033378 -e RPC_PORT=6800 \
-e LISTEN_PORT=6888 -p 16800:6800 -p 16888:6888 -p 16888:6888/udp \
-v /mnt/temp/ssd/docker/date/aria2/config:/config \
-v /mnt/temp/ssd/ssd/downloads:/downloads  p3terx/aria2-pro

 lvreduce -L -32G /dev/pve/root -f

 resize2fs /dev/mapper/pve-root

 qm importdisk 101 /root/arpl.img local-lvm